package com.bd.test.demonet.controller;


import com.bd.test.demonet.entity.BdTest;
import com.bd.test.demonet.service.ITestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yufc
 * @since 2020-04-24
 */
@RestController
@RequestMapping("/api/test")
public class BdTestController  {

    @Autowired
    private ITestService iBdTestService;

    @GetMapping("list.do")
    public List<BdTest> getList(){
        return iBdTestService.getList();
    }

    @PostMapping("add.do")
    public int add(@RequestBody BdTest userInfo){
        return iBdTestService.add(userInfo);
    }

    @PostMapping("addList.do")
    public int addList(@RequestBody List<BdTest> userList){
        return iBdTestService.addList(userList);
    }

    @GetMapping("docker")
    public String test(){
        return "hello docker";
    }
}
